Technical Q&As
QD 46: Does This Printer Support PostScript? (9-Jan-97)
Q
I am trying to find a way for my application to determine if it is using a
Postscript printer or not. For performance reasons, I'd like to send
custom PostScript instead of a PICT to the printer if I can. Is there an
API to find out if the currently selected printer uses PostScript?
A
There is no guaranteed way of doing this. For Apple's LaserWriters, you can
determine this by looking at the wDev field in the print record of the
currently selected printer. In order to determine whether the current printer is
PostScript, here is a quote that is hidden in one of our older Technotes,
Technote QD10 "Picture Comments--The Real Deal":
"The high byte of the prStl.wDev field of the print record
identifies a printer driver species; a value of $03 tells you that the
printer driver belongs to the PostScript LaserWriter driver ancestry..."
This Technote may be useful to you if you haven't already read it. You
should also look at
Inside Macintosh: Imaging With QuickDraw for more
generic information on the print record.
However, although the Apple LaserWriter driver has a wDev of 3,
third-party printer drivers for PostScript devices do not, so if your
application determines whether or not to send PostScript based on wDev
alone, your application may incorrectly print with QuickDraw on
third-party PostScript devices.
--Ingrid Kelly
Worldwide Developer Technical Support
Technical Q&As
Contents | Next Question
To contact us, please use the Contact Us page.